package com.hlkj.baojin.dao;

import com.hlkj.baojin.entity.User;
import org.omg.CORBA.INTERNAL;
import org.springframework.data.mongodb.repository.MongoRepository;
import org.springframework.stereotype.Repository;

@Repository
public interface IUserDao extends MongoRepository<User, String> {


    /**
     * 通过用户名查找用户
     * 开启缓存
     *
     * @param username 用户名
     * @return 用户信息
     */
    User findByUsername(String username);

    User findByDeptId(String deptId);

    User getById(String id);

    User findByUsernameAndType(String username, Integer type);

    User findByUsernameAndSmsCode(String username, String smsCode);

    User findByType(int i);
}
